
#ifndef __TJC_HMI_H
#define __TJC_HMI_H

#include "stm32f4xx.h"                  // Device header
#include <stdio.h>
#include "usart.h"

/* 串口屏串口通信基本配置 */
#define     HMI_Init(baud)      (USART2_Init(baud))
#define     HMI_SendByte(byte)  (USART2_SendByte(byte))

/* 一些特殊字符 */
#define     CHAR_0XFF   ()

void    HMI_SetTxt          (const char *obj, const char *txt);
void    HMI_SetTxtFormat    (const char* obj, const char* format_txt, ...);
void    HMI_SendCmd         (const char *cmd, const char *data);
void    HMI_SendCmdFormat   (const char* cmd, const char* format_data, ...);
void    HMI_SetVal          (const char *obj, float num, uint8_t n);
void    HMI_BEEP            (uint16_t xms);

#endif
